/**
 * 
 */
package br.unicamp.ic.lsd.wscaa.concurrent;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import br.unicamp.ic.lsd.wscaa.exception.WSDynamicException;
import br.unicamp.ic.lsd.wscaa.model.ExceptionHandler;

/**
 * @author renatomanzoni
 * 
 */
public class ConcurrentHandler implements ExceptionHandler {

	private final ConcurrentExceptionSync asyncHandler = ConcurrentExceptionSync.getInstance();

	private static Log logger = LogFactory.getLog(ConcurrentHandler.class);

	public ConcurrentHandler() {

	}

	/**
	 * @see
	 * br.unicamp.ic.lsd.wscaa.model.ExceptionHandler#handleException(br.unicamp
	 * .ic.lsd.wscaa.exception.WSDynamicException)
	 */
	@Override
	public void handleException(WSDynamicException e) {

		if (logger.isDebugEnabled())
			logger.debug("Adding exception in ConcurrentExceptionSync");

		asyncHandler.addException(e);

	}

}
